#-*-encoding=utf-8-*-
@script_attr(permission=u'zope.View',use_template=True)
def index():
    """首页

这是应用的首页"""

    ssologin_url = appletsetting['ssologin_url']
    oa_column = appletsetting['oa_column']
    sso_pwd = appletsetting['sso_pwd']
    
    user = request.principal.id.split('.', 1)[1]
    result = []
    for one_column in oa_column:
        one_result = {}
        one_result['name'] = one_column['column_name']
        one_result['url'] = ssoURL(user, ssologin_url, sso_pwd, one_column['column_url'])
        result.append(one_result)
    return render_template('oa_index', columns = result, first_url = result[0]['url'])
    

